<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>

		<script type="text/javascript">
			// 12345
			for (var i = 10000; i <= 99999; i++) {
				var gw = i % 10;
				var sw = parseInt(i % 100 / 10);
				var bw = parseInt(i % 1000 / 100);
				var qw = parseInt(i % 10000 / 1000);
				var ww = parseInt(i / 10000);
				if (gw === ww && sw === qw && qw === ww + 1 && bw === qw + 1) {
					
					console.log(i);
				}
			}
			// console.log(12345 % 1000 / 100);
		</script>
	</body>
</html>
